Skip to content

Conversation

@ecmadao
Copy link
Collaborator

@ecmadao ecmadao commented Dec 6, 2024

  • Use github.com/bytebase/bytebase v0.0.0-20241205093738-38cba35b1547 to get the latest protocol
  • Support the workflow approval flow setting (a little difference with the protocol API for a better experience)
resource "bytebase_setting" "approval_flow" {
  name = "bb.workspace.approval"
  approval_flow {
    rules {
      flow {
        title       = "DBA -> OWNER"
        description = "Need DBA and workspace owner approval"
        creator     = "users/[email protected]"

        # Approval flow following the step order.
        steps {
          type = "GROUP"
          node = "WORKSPACE_DBA"
        }

        steps {
          type = "GROUP"
          node = "WORKSPACE_OWNER"
        }
      }

      # Match any condition will trigger this approval flow.
      conditions {
        source = "DML"
        level  = "MODERATE"
      }
      conditions {
        source = "DDL"
        level  = "HIGH"
      }
    }
  }
}

@ecmadao ecmadao changed the title Chore/byt 6671 chore: support approval flow Dec 6, 2024
@ecmadao
Copy link
Collaborator Author

ecmadao commented Dec 6, 2024

@ecmadao ecmadao merged commit cb288ca into main Dec 6, 2024
4 checks passed
@ecmadao ecmadao deleted the chore/BYT-6671 branch December 6, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants